The invention is related to the field of software breakpoint handling, and in particular to improving performance of software breakpoint handling by eliminating instruction replacement and execution under certain conditions.
Some debuggers, like GDB for example, offer an option that determines how breakpoints are treated when the processor halts. The breakpoints can be either left in memory or removed from memory. If the breakpoints are left in memory and the debugger is asked to read memory in an area where a breakpoint exists, the debugger will mask the breakpoint with the original memory contents before displaying it to the user.
The invention improves over the prior art by increasing the speed and performance in handling specific kinds of breakpoints by eliminating instruction replacement and execution under certain conditions.